home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
newrouts
/
newrouts.bas
< prev
next >
Wrap
BASIC Source File
|
1997-06-13
|
1KB
|
39 lines
Attribute VB_Name = "modRoutines"
'In general declarations of a .BAS Module
Declare Function OSWritePrivateProfileString% Lib "Kernel32" Alias "WritePrivateProfileStringA" (ByVal AppName$, ByVal KeyName$, ByVal keydefault$, ByVal FileName$)
Declare Function OSGetPrivateProfileString% Lib "Kernel32" Alias "GetPrivateProfileStringA" (ByVal AppName$, ByVal KeyName$, ByVal keydefault$, ByVal ReturnString$, ByVal NumBytes As Integer, ByVal FileName$)
Public gobjVBInst As Object
Public gIsFunction As Boolean
Public gMaxLen%, gAuthorName$
Public gParms(), EasterEgg As Boolean
Sub Main()
'**************************************
'* Author : Michael J. Cox
'* Date : 6/13/97
'* Email : mikec247@ix.netcom.com
'*
'* Desc:
'* This is the entrance point of
'* Addin. When the EXE is executed
'* The Addin will register itself
'***********************************
Dim ReturnString As String
Dim Section As String
Dim ErrCode
'--- Check to see if we are in the VB.INI File.
' If not, Add ourselves to the INI file
Section = "Add-Ins32"
ReturnString = String$(12, Chr$(0))
ErrCode = OSGetPrivateProfileString(Section$, "NewRouts.NewRout", "NotFound", ReturnString, Len(ReturnString) + 1, "VB.INI")
If Left(ReturnString, ErrCode) = "NotFound" Then
ErrCode = OSWritePrivateProfileString%(Section$, "NewRouts.NewRout", "0", "VB.INI")
End If
End Sub